const path = require('path');

// ../会抵消前面一层路径
const pathStr = path.join('/a', '/b/c', '../', './d');
console.log(pathStr); // /a/b/d

const pathStr2 = path.join(__dirname, './files/1.txt');
console.log(pathStr2);
